package br.com.redefranciscanas.wiki.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@Entity
@NamedQueries({ @NamedQuery(name = "Topico.findAll", query = "SELECT t FROM Topico t"),
		@NamedQuery(name = "Topico.findById", query = "SELECT t FROM Topico t WHERE t.id =:id"),
		@NamedQuery(name = "Topico.findByTitulo", query = "SELECT t FROM Topico t WHERE t.titulo =:titulo"),
		@NamedQuery(name = "Topico.findByResumo", query = "SELECT t FROM Topico t WHERE t.resumo LIKE :resumo") })
public class Topico {

	@Id
	@GeneratedValue
	@Column(name = "idTopico")
	private Long id;
	private String titulo;
	@Column(columnDefinition = "TEXT")
	private String resumo;
	private String caminho;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitulo() {
		return titulo;
	}

	public void setTitulo(String titulo) {
		this.titulo = titulo;
	}

	public String getResumo() {
		return resumo;
	}

	public void setResumo(String resumo) {
		this.resumo = resumo;
	}

	public String getCaminho() {
		return caminho;
	}

	public void setCaminho(String caminho) {
		this.caminho = caminho;
	}
}